Overview

PocketASM is a mighty editor for Pocket Computer programming

Many useful features like language files, auto completing, mnemonic explanations during typing, macros, send and receive serial data and converters for the different number formats of pocket computers make programming really an easy job. The assembler from Laurent Duveau generates the machine code at last. This code is meant for old 8 bits Sharp pocket computers with the SC61860 CPU.

This program is freeware and can be copied and given away without modifications! Users will surely appreciate new languages, additional macros and mnemonic sets!

I would be very glad if you send me bug reports, tipps to improve the program, thanks and gifts!

Just click contact!


Menu File

The Menu File

  • New (Strg+N): Clears the text window.
  • Open... (Strg+O): Opens a file ( [image] Dialogues).
  • Save (Strg+S): Saves the actual text window to a file.
  • Save as... (Strg+U): Saves the window to another file ( [image] Dialogues).
  • Print... (Strg+P): Opens the print dialogue ( [image] Dialogues).
  • Language (Strg+L): Opens the language file dialogue ( [image] Dialogues). You can translate a language file into your language, too!
  • Pocket Computer:
    Here you can select another Pocket Computer model.
  • Quit (Alt+F4): Closes the programm.

Top


Menu Edit

The Menu Edit

  • Undo (Strg+Z): Undos the last text operation. Be careful with operations which change the whole text (RENUM, Assemble, Disassemble, etc)! They often can't be undone.
  • Cut (Strg+X): Cuts the selected text to the clipboard.
  • Copy (Strg+C): Copies the selected text to the clipboard.
  • Insert (Strg+V): Pastes the text from the clipboard where your cursor is.
  • Delete (Entf): Deletes the selected text.
  • Select all (Strg+A): Selects the whole text.
  • Break lines: Text which is too long will be broken to the next line.
  • Font...: Opens the font dialogue ( [image] Dialogues)
  • Assembler mode: Switches PocketASM to the assembler mode. Commands are now interpreted as mnemonics.
  • BASIC mode: Switches PocketASM to the assembler mode. Commands are now interpreted as BASIC commands.
  • Command description: Switches the command explanation in the statusbar on and off.
  • Ato completing: Switches the command completing on or off. PocketASM can complete commands during typing. In BASIC mode this completion will use Pocket Computer specific abbreviations like B. -> BEEP on PC-1360.
  • Limited lines: When a line gets longer than 80 bytes in Pocket Computer memory a warning beep will sound.
  • Insert:
    This menu allows you to select from the mnemonic list. The statusbar will show a brief explanation.
  • BASIC:
    Here you can choose basic commands for the selected computer model.
  • Macros... (Strg+M): Opens the macro manager ( [image] Macros).

The Right-Click-Menu

    Most features are identical with the edit menu.

  • Undo (Strg+Z): Undos the last text operation. Be careful with operations which change the whole text (RENUM, Assemble, Disassemble, etc)! They often can't be undone.
  • Cut (Strg+X): Cuts the selected text to the clipboard.
  • Copy (Strg+C): Copies the selected text to the clipboard.
  • Insert (Strg+V): Pastes the text from the clipboard where your cursor is.
  • Delete (Entf): Deletes the selected text.
  • Select all (Strg+A): Selects the whole text.
  • Find Label: Searches for the selected label in assembler code. So you can find the destination of a jump quickly.
  • Convert to...: Converts the number the cursor is blinking on to several formats.
  • Insert:
    This menu allows you to select from the mnemonic list. The statusbar will show a brief explanation.
  • BASIC:
    Here you can choose basic commands for the selected computer model.
  • Macros... (Strg+M): Opens the macro manager ( [image] Macros).


Menu Search

The Menu Search

  • Search (Strg+F): Opens the search dialogue ( [image] Dialogues).
  • Go on (F3): Searches for the next fitting text.
  • Replace (Strg+H): Opens the replace dialogue ( [image] Dialogues).


Menu Tools

The Menu Tools

  • Assemble to...:
    The different assemble options open a save file dialogue to store the result in ( [image] Assembler).
  • Assemble to window (F6): Assembles the data into the window ( [image] Assembler)
  • Disassemble (F7): Disassembles the assembled code back to source code. For this the data must be present as decimal numbers in seperate lines.
    Input the start address of the code
    The output window
  • Disassemble to window (F8): Disassembles the data into the text window.
  • Converter:
    With these tools you can convert numbers and characters ( [image] Converter).
  • Convert files...:
    With these tools you can convert the different file formats.
  • Graphicsdesigner: With this tool you can create logos and pictures for Pocket Computers. You can open as many windows as you want. ( [image] Graphicsdesigner).
  • Musicdesigner: Calculates the BBEP values to different notes.
  • BASIC Renum (F12): Renumerates basic programs.
    Input the new start line number
    The step between the lines
    Warning when a jump points to a wrong line.
  • Calculate program size (Strg+F12): Calculates the size of the program in Pocket Computer memory.
  • Data transmission:
    Tools for receiving and sending data ( [image] Serial Functions).


Menu ?

The Menu ?

  • Help (F1): Opens the help file.
  • Info (Strg+I): Shows the info dialogue.


Dialogues

The Different Dialogues

  • Print:

    The print dialogue from Windows.
  • Open:

    The open file dialogue.
  • Save:

    The save file dialogue
  • Language:

    The language file dialogue
  • Font:

    The font dialogue
  • Search:

    The search dialogue
  • Replace:

    The replace dialogue


Message Boxes

  • The command set files have names like "Befehle1360.txt". They must be in the same directory like PocketASM.exe!

  • After converting a file this box appears.

  • The macro files must stand in the "makros" folder. They have names like "EnglishMakros.mak"

  • The mnemonic list must have the name "mnemonics.txt" and must stand in the same folder like PocketASM.exe.

  • The CTS-signal is activated in the serial settings (F11). You Pocket Computer doesn't send this signal or the cable is damaged.

  • There exists a file with the same name.

  • A parity error has happened during a transmission and the data can be corrupted.

  • This dialogue appears when the file was not saved yet and you try to close it.

  • This dialogue appears when the file was not saved yet and you try to close it.

  • The language file has to be selected.

  • The selected language file is not a language file or it is too short (perhaps it is too old).

  • The transdrive format can't save any additional information like comments so you should save your file normally first.


Assembler

  • Writing PocketASM programs
  • PocketASM set of instructions
  • Example program
  • Remarks and tricks
  • Programming helps

You can find additional info about programming in machine language in this help there.

The assembler from Laurent Duveau generates machine code for all pocket computers from Sharp with the SC61860 CPU. It can deal with variables, formulas and jumps, too. In the following is the original help text:

Writing PocketASM programs

PocketASM is not case sensitive.

Comments are marked with either one of those three characters:
# ' ;
All characters placed at the right side of one of these three characters will be ignored.

You can use variables in your programs by defining them with an EQU instruction (see below).
Labels are marked with a

:

sign next to it. For example,

Toto:

is a valid label. A label is no more than a variable defined to point to an address.
You can use decimal, hexadecimal or binary numbers:

  • binary numbers are preceeded by a b. For example: b10010
  • hexadecimal numbers are preceeded by a & (like in Sharp PCs) or a h. For example: &3B5A or h3B5A
  • decimal numbers are either preceeded by a d or not preceeded by any character. For example: d3538 or 3548

PocketASM comes with a mathematical calculator. It supports the following operators and functions:
+ - * / ( )
Just note that you should not insert spaces inside a formula, otherwise PocketASM will consider it as two parameters (parameters of an instruction are separated by spaces).

The usual format of one PocketASM line is as follows:
[Label:] Expression [Parameter 1] [Parameter 2] ... [# Comment]
All stuff between brackets is optional (labels, comments) or is related to the instruction (number of parameters).

PocketASM set of instructions

In addition to the standard SC61860 set of instructions, PocketASM comes with a few additive instructions for the compiler's use.

ORG

  • Mnemonic: ORiGinal address
  • Format: ORG address
  • Description: Defines the start address of the compiled program. To run the program you should write CALL address from the PC prompt ('>').

EQU

  • Mnemonic: EQUivalent
  • Format: Variable EQU value
  • Description: Defines variables that you will then be able to use in place of numerical values in the assembler program.

DB

  • Mnemonic: Define Byte
  • Format: DB value1 value2 ... value n
  • Description: Is used to put values in the program. These values have to be 1 byte (8 bits) values and they will require one byte in RAM space.

DW

  • Mnemonic: Define Word
  • Format: DW value1 value2 ... value n
  • Description: Is used to put values in the program. These values have to be 2 bytes (16 bits) values and they will require two bytes in RAM space.

DS

  • Mnemonic: Define String
  • Format: DS "string"
  • Description: Is used to put strings in the program. PocketASM will convert the ASCII codes of the string parameter and put their numerical value in the Pocket Computer. Since the ASCII set is different between Big PCs and PCs, some of these string characters will be converted to their equivalent to be used in PCs. One byte in RAM space will be required for each character of the string.

PTJ

  • Mnemonic: Prepare Table Jump
  • Format:
    PTJ
    DB number of compares
    DW return address
  • Description: Prepares a table call: You enter the number of compares and the return address which is used by the RTNs from the called routines.

DTJ

  • Mnemonic: Do Table Jump
  • Format:
    DTJ
    DB compare value
    DW routine address
    DB compare value
    DW routine address
    ...
    DW else address
  • Description: Executes the table call: For each comparison you need to enter a value which is compared to A and an address which the computer will call then. After this you must give the else address which it will call when no value fits. This address does not count in the numbers from PTJ!

Example program

Here is a small example of PocketASM code (this sample code produces nothing of interest, it is just meant to give you an example of PocketASM coding), an example always being better than a long explanation:

#########################################
# This is a sample PocketASM source code  #
# This program adds two 16 bits numbers #
#########################################
        ORG  33000            # 33000 = Start address of program
A_REG   EQU  2                # Defines Registers used by program
XL_REG  EQU  4
        JP   BEGIN            # Entry point of the program, at
                              # address 33000
BEGNUM:                       # Addresses where numbers to be
NUM1:   DW   0                # added will be placed by the
NUM2:   DW   0                # calling (Basic) program
ENDNUM:
BEGRES:                       # Address where result of addition
RESULT: DW   0                # will be returned for the
ENDRES:                       # calling (Basic) program
BEGIN:  LIDP NUM1             # DP gets the address of NUM1
        LII  ENDNUM-BEGNUM-1  # I gets value 3
        LP   A_REG            # P gets value 2
        MVWD                  # Stores NUM1 in A and B registers
                              # and NUM2 in XL and XH registers
        LP   XL_REG           # P gets value 4
        ADB                   # X register gets the result of
                              # addition NUM1+NUM2
        LIDP RESULT           # DP now points to RESULT variable
        LII  ENDRES-BEGRES-1  # I gets value 1
        LP   XL_REG           # P gets value 4
        EXWD                  # RESULT gets the result value
                              # stored in the X register
END:    RTN                   # End of the program

Remarks and tricks

You might feel more confident in using the LIDP instruction, not LIDL... unless you make sure that the LIDL instruction will remain in the same block of 256 bytes.
PocketASM deals very easily with absolute and relative jumps, by just adressing one label as parameter.

# Stupid sample program
        LIA  1                # A gets value 1
        CPIA 10               # A is compared to value 10
        JRCP BIG              # if A is < 10 then go to BIG
        LIB  5                # B gets value 5
        JP   END              # Jump to end of program
BIG:    LIB  50               # B gets value 50
END:    RTN                   # End of program

Programming helps

PocketASM supports programmers with features like auto completing, cursor position, explanation of the instructions and macros.

  • When moving the cursor the position in the status bar is updated.
  • During typing PocketASM shows a possible mnemonic which you can accept with pressing space or TAB or you can go on typing.
  • The instruction below the cursor is explained in the status bar.
  • With a right click youcan convert the number at the cursor position or jump to labels.
  • A list with all instructions to insert in your program is available in the main menu and the right click menu.
  • PocketASM opens and saves Transdrive files and converts them to BASIC or machine language.
  • You can select the model of your pocket computer
  • Macros, which can be edited, created, moved, renamed and deleted, make the program user editable.


Graphics Designer

    This tool makes it simple to create logos and pictures for Pocket Computer. Just klick on the drawing pane to set and clear pixels!

  • The drawing pane: Here you can edit evey single pixel.
  • Hex / Dez: The format of the code. HEX represents the GPRINT format like GPRINT "FF013A", DEZ shows you a list of bytes, every byte stands for a column.
  • All on/off: Switches every pixel on or off.
  • Invert: Inverts the whole picture.
  • Load: Opens a saved picture.
  • Save: Saves the current picture.
  • Output window: Here you can copy the code to your program or input data to draw.


Macros

  • In the left side there is the manage tree where you can see all available macros. Here you can edit, delete and create macros with a simple right click. To move a macro to a certain position just drag it! If you drag it left to an icon it will be inserted before this icon. On the right side it will become a child of this icon. When you want to create makros for a new computer type, drag it to the end of the list.
    Rename a macro with a click on it when it is selected, delete it with the DEL key.
  • On the right you can see the description of the selected macro and further options.
  • ROM Version: PC-1360 can have different versions of the inbuilt operating system. Version 1 is the newer one. You can get the version with PEEK &7FFF: 5 means version 1, lower values 0.
  • Compare what: Only available for compare operations. Click what you want to compare.
  • Operation registers: You can add code to work with the operation registers.
  • The buttons Insert and Close: Insert adds the code in your document where the cursor is, Close closes the macro manager.
  • Name: Here you must enter the name of your macro which will appear in the tree.
  • Description: Here a description what your macro needs and does.
  • Result: Here you must enter the description of the result, what it means and what you can do with it.
  • Comparison: Do make a comparison? You can use this feature for macros which have several alternatives, too.
  • Code Version: Here you can enter code for the two different versions of PC-1360. You can use this for even more alternatives, too.

The files in the "Makros" folder:

Structure of macro files:

  • Name: language name + Makros.mak
  • Content: This is the tree in the macro manager. The level is shown through inserted tabs, the macro data is added to the name.
  • The blocks: (separated with "|", returns are replaced by "\n")
    1. Block: Description of the function and the entry conditions - this is the text in the upper info box!
    2. Block: Description of the result, the changes to the system, etc - this is the text in the lower info box!
    3. Block:
    ID number:
    0 = Version 0 code and version 1 code are following in two further blocks
    1 = The comparison number/string is activated and the code for version 0/1 number and then version 0/2 string has to follow in four further blocks
    The rest of the blocks depend on the ID!

Special files:

  • Name: orXYstart.txt
  • Content: This is the code which is inserted at the beginning of the text when you choose to fill the operation registers in your program.

  • Name: readORx.txt, readORy.txt, readORxy.txt
  • Content: This is the code which is inserted before the macro code to read the operaion registers X/Y or both.


Serial Transmission

The Serial Transmission

    You can watch the process of sending/receiving in the status bar. With the ESC key or a click on Stopp will cancel the transfer.

  • Send window (F4): Sends the content of the text window with the current settings.
  • Receive to window (F5): Receives data and writes it into the text window. If you select text only this text will be overwritten.
  • Send file (Strg+F4): Sends a file.
  • Receive file (Strg+F5): Receives a file. Use this function to receive binary data, because PocketASM can't display binary data.
  • Test: Tests the connection to a Pocket Computer by sending some characters. You can check the result in the pocket computer then.
    How to do the test.
    Error which appears when the CTS signal is activated and won't come from the Pocket Computer.
  • Settings... (F11): Opens the settings dialogue.
    Here you can edit the serial properties.
    • COM port: The port where the pocket computer is connected to.
    • baud rate: The baud rate is the speed for the serial transmission. You can use an own rate like 1950, too.
    • data bits: The number of bits for a byte transmitted.
    • stop bits: The number of used stop bits after a serial transmitted byte.
    • line ending code: After each line there is a ending code transmitted. Ignore does not change the transmitted data.
    • program ending code: After a pocket computer basic program is transmitted an ending code is sent. You can make the program add this byte automatically after a transmission.
    • CTS signal: The CTS signal from the pocket tells the program if it is ready to receive data. For this feature your cable must support this line!
    • Parity: This function makes error recognition in serial transmissions possible.


Statusbar

The Statusbar

  • The statusbar shows the cursor position, information to commands and menus, transmission status and Pocket Computer models.
  • Command descriptions for assembler code:

  • BASIC tokens:
  • Serial settings:
  • Receiving data:
  • Sending data:
  • Right click in the transfer bar:

    Here you can transfer data quickly ( [image] Serial Interface).
  • Right click in the model name:

    Here you can select a Pocket Computer model quickly.


Hotkeys

The program can be controlled using hotkeys:

Ctrl+N | New
Ctrl+O | Open
Ctrl+S | Save
Ctrl+U | Save as...
Ctrl+P | Print
Ctrl+L | Language
Alt+F4 | Quit
Del | Delete
Ins | Insert/Overwrite
Ctrl+Z | Undo
Ctrl+X | Cut
Ctrl+C | Copy
Ctrl+V | Insert
Ctrl+A | Select all
Ctrl+F | Search
Ctrl+H | Replace
F3 | Search again
F9 | Assemble to decimal code
F10 | Assemble to Basic installer
F6 | Assemble to window
F7 | Disassemble
F8 | Disassemble to window
Ctrl+F6 | Decimal Hexadecimal Binary converter
Ctrl+F7 | BCD number converter
Ctrl+F8 | ASCII byte converter
Shift+F2 | The number below the cursor is being converted to hexadecimal.
Shift+F3 | The number below the cursor is being converted to decimal.
Shift+F4 | The character below the cursor is being converted to its ASCII code.
Shift+F5 | The number below the cursor is being converted to a single byte.
Shift+F6 | The number below the cursor is being converted to its low and its high byte.
F12 | BASIC RENUM
Ctrl+F12 | Program size calculation
F4 | Send window
F5 | Receive to window
Ctrl+F4 | Send file
Ctrl+F5 | Receive file
F11 | Properties
F1 | Help
Ctrl+I | Info window


TransDrive System

The TransDrive System

    The TransDrive features are working in the background while you open or save files. Binary input or the file extension .td will make PocketASM to convert this format. Normally TransDrive includes all the data so no input boxes or questions will appear.

  • Opening a file with binary input will show this question:
    If the file should contain BASIC code you must answer with "yes".
  • If it is basic code you must select a Pocket Computer model:
    Now you must choose the model the basic code is from.
  • If it is machine language you must answer this question:
  • PocketASM wants the start address if you want to disassemble:


Converter

The Converters

  • In the top edit you enter decimal numbers 0..9, which are converted to the other formats. Floating point numbers are not allowed.
  • In the middle are the hexadecimal numbers 0..9 and A..F.
  • Below you can enter binary numbers with 0 and 1.
  • Top edit: Decimal floating point number. Comma, E and sign are possible. Example: -1,2756E-38
  • Below are the resulting BCD Bytes in decimal format. You can edit them, too.
  • Top edit is the character.
  • Below is the ASCII code as a decimal number.


Short Manual

Short Manual For PC-1360, PC-1350, PC-1403(H), PC-1475 And PC-E500

  • Usage as a calculator
  • Editing of BASIC programs
  • The mathematics of the pocket computers
  • Function keys
  • BASIC commands

Usage as a calculator:

Only in RUN MODE

Type the numbers, brackets, operators and commands (SIN, COS, EXP...) like the original term.

In CAL MODE (only computers with CAL key)

1403 | 1475 | E500 | Key
x | x | x | [2ndF]/[SHIFT] key: With this you can use the functions written above the key.
x | x | x | [FSE] key: Switches display modes normal, FIX, SCI and ENG.
x | x | x | [TAB] key: Together with the SCI mode TAB + 0 to 9 defines the digits behind the dot.
x | x | x | [C-CE] key: Deletes errors, results and entries. The memory content will be preserved.
x | x | x | [DRG] key: Degree mode: Degree, Radian and Grad.
x | x | x | [EXP] key: To enter an exponent.
x | x | x | [+/-] key: Reverse sign.
x | x | x | [SIN], [COS], [TAN], [HYP], [SIN-1], [COS-1], [TAN-1], [ARCHYP]: Trigonometrical functions.
x | x | x | [M+], [x->M], [RM]: Memory functions. [M+] adds the shown number to the memory, [x->M] overwrites the memory with the actual number. You can recall the memory using [RM] and clear it with [C-CE] + [x->M].
x | x | x | [x²], [yx], [ [image] ], [³ [image] ], [x [image] ]: Power and root.
x | x | x | [ln], [log], [e10], [ex]: Exponent and logarithm.
x | x | x | [1/x], [n!]: Reciproc- and faculty.
x | x | x | [%] key: Procents: 45% of 2780 -> press: 2780 [*] 45 [%] [=]
x | x | x | [->DMS], [->DEG]: Degree and time conversion: DEG converts a degree or hours:minutes:seconds to a decimal number. DMS vice versa.
x | x | x | [->rO], [r,O->x,y]: Conversion of rectangle to polar coordinates and vice versa.
x | x | x | Doubled arrow key: Exchange x and y variables.
x | x | x | [->HEX], [->DEC]: Conversion from decimal to hexadecimal and vice versa.
x | x | x | [C-CE] + [->HEX]: Use HEX MODE. You can calculate hexadecimal numbers but no fractions.
x | x | x | [(],[)]: Use brackets to calculate expressions in any order.
x | x | x | [0]..[9]: Digit keys.
x | x | x | [+],[-],[*],[/]: Operators.
x | x | x | [.]: Decimal dot.
x | x | x | [ [image] ]: The number "Pi".
x | x |  | [n] key: Statistics: x value count.
x | x |  | [Ex] key: Sum of x values.
x | x |  | [Ex²] key: Sum of x² values.
x | x |  | [x] key: Ø of x values.
x | x |  | [sx] key: Standard difference based on parameter n-1.
x | x |  | [ox] key: Standard difference based on parameter n.
x | x |  | [Ey] key: Sum of y values.
x | x |  | [Ey²] key: Sum of y² values.
x | x |  | [Exy] key: Sum of y² and x² values.
x | x |  | [y] key: Ø of y values.
x | x |  | [sy] key: Standard difference based on parameter n-1
x | x |  | [oy] key: Standard difference based on parameter n
x | x |  | [STAT] key: Statistic mode and data input mode: Enter a value, press [ENTER], navigate with cursor keys.
x | x |  | [FREQ] key: To enter the same value more times use value [FREQ] number of value [ENTER].
x | x |  | [STAT CALC] key: Calculates the data. After this you can get the results.
x | x |  | [a] key: Regression analysis: y=bx+a, shows a.
x | x |  | [b] key: Regression analysis: y=bx+a, shows b.
x | x |  | [r] key: Regression analysis: y=bx+a, shows the correlation coefficient r.
x | x |  | [y'] key: Regression analysis: y=bx+a, shows y'.
x | x |  | [x'] key: Regression analysis: y=bx+a, shows x'.
x | x |  | [RESID] key: Shows the error of the analysis.
x | x |  | [SHIFT] + arrow down/up: Matrix mode.
x | x |  | Cursor keys: Navigate in the matrix.
x | x |  | [ENTER]: Saves the entered number in the matrix.
x | x |  | [+],[-],[*],[/],[INV]: Matrix combinations: [+]: X + Y -> X, [-]: X - Y -> X, [*]: X * Y -> X, [/]: X * Y-1 -> X, [INV]: X-1 -> X
x | x |  | n [+],[-],[*],[/]: Adds, subtracts... each element of matrix n.
x | x |  | Double arrow key: Exchange matrixes X <-> Y.
x | x |  | [TRN] key: Transposition of matrix X: X1 -> X
x | x |  | [DET] key: |X| -> X (Display): Calculates the determinant of matrix X.
x | x |  | [+/-] key: Reverses the sign of all elements in the active matrix.
x | x |  | [SQU] key: Squares the matrix X: X * Y -> X.
x | x |  | [x->M] key: Saves matrix X in the memory matrix M.
x | x |  | [RM] key: Loads matrix X from matrix M.
x | x |  | [M+] key: Cumulative addition of matrix X to M: X + M -> M.
x | x |  | [STO] + [A]..[Z]: Saves matrix X in MA..MZ.
x | x |  | [RCL] + [A]..[Z]: Loads X from MA..MZ.
x | x |  | [EQU] key: Solves the linear system of matrix X and Y.
x | x |  | [RESID] key: MX - Y -> X, to interpret the solution of [EQU].

Writing and editing of BASIC programs:

Only in PROGRAM MODE

First write the line number then data, commands, calculations, etc. To save the line press ENTER. To enter a stored line press the cursor left or right. You can change the line with up and down. The INS key inserts a free place, DEL deletes the character below the blinking cursor. You can abbreviate commands: P. -> PRINT, I. -> INPUT. To delete a line, simply type the number and then ENTER: 10 [ENTER] deletes line 10. To copy a line just use cursor left and then overwrite the line number with the new number and press ENTER. To overwrite an existing line simply write a line with the same number and press ENTER. If an error occurred the cursor will appear at the location where the error occurred when you press up or down. When you press ENTER then or restart the program this will stop. If you press CLS and then up or down, you will jump to the end or beginning of the program.

The mathematics of pocket computers:

Rank list of operators: Brackets, variables, functions, exponent, sign, * /, + -, comparisons, logical operators (AND, OR, NOT)
Hexadecimal numbers start with a & (i.e. &3F)
Variables are assigned with a = (X=35), the name can have up to 2 characters A..Z, 0..9 (must start with a letter)

Special functions:

1350 | 1360 | 1403 | 1475 | E500 |
x | x | x | x |  | [DEF] key + character in dark marked area: Fast start of program given this letter at the line beginning, i.e.: 10 "S" PRINT 2*2: END. PC-E500 can use 10 *A PRINT... as label, too.
x | x | x | x |  | [SML] key: Small letters
x | x | x | x | x | [DEL] key: Deletes the character below the cursor.
x | x | x | x | x | [INS] key: Inserts a space (looks like [ ]) to be overwritten with a character.
 |  |  | x | x | [BS] key: Deletes the character before the cursor.
x | x |  |  |  | [CLS] key: Clear screen or when INPUT: deletes input
 |  | x | x | x | [C-CE] key: Clear screen or when INPUT or CAL: deletes input
 |  |  |  | x | Menu change key: Switches the menus
 |  |  |  | x | Menu keys [PF1]-[PF5]: Selects the function which is displayed above the key or inserts a basic command
 |  |  |  | x | [CTRL] key: Extra functions, i.e. [CTRL]+0 switches key beep
 |  |  |  | x | [ANS] key: Displays the last answer
 |  |  |  | x | [CAPS] key: Big letters
x | x | x | x | x | [BRK/ON] key: Stops a running BASIC program or switches the computer on after auto power down.
x | x | x | x | x | [RESET] key (back cover): Deletes the RAM card and resets the PC. Press Y to initialise.
x | x | x | x | x | [RESET] + any key: Only resets the PC, the memory will not be deleted.
x | x |  |  |  | [MODE] key: Switches between program and run mode.
 |  | x | x | x | [BASIC] key: Switches between program and run mode.
 |  | x | x | x | [CAL] key: Switches to calculator mode.
x | x |  | x |  | RESERVE mode: [SHIFT] + [MODE]/[BASIC]: With [SHIFT] + character (in the dark marked area) you can edit shortcuts for text macros. Press [ENTER] to store the macro. A [@] is the equivalent to the enter key.
x | x | x | x |  | [SHIFT] key + character (dark area): Macro is executed if it exists.
x | x | x | x | x | Abbreviations: Type the first letter(s) and a dot of the command and the next fitting command will replace it, i.e.: B. [ENTER] -> BEEP
x | x | x | x | x | Cursor keys: Navigate in programs and terms. After enter you can get back with <- or -> in most cases (when a result was displayed). In programs you can scroll up and down or show the running line after a break or input.
x | x | x | x | x | Strings must stand between "". At the end of a line you can forget the last " !

Programming the computer:

Notes:

  • d: means a device: "X:Calculat.BAS" you can use X and Y drives on PC-1350 and PC-1403, PC-1475 and PC-1360 have X,Y (Disk), F (RAM Disk) and PC-E500 CAS (Cassette), COM (serial interface), X and Y (Disk), E and F (RAM Disk).
  • [ ] means: Parts like this are optional.
  • ( ) means: You need brackets.
  • " " means: You need " " or a string variable.
  • List: A list with data separated with [,]: 12,231,999,"Hello",CHR$ 13
  • String: A string or a string variable
  • Var$: A string variable
  • Line: A line number or a label
  • Address: An address from 0..65535
  • BCRP: The command can only be used in BASIC programs (B), command line (C), run (R) and program (P) mode.
1350 | 1360 | 1403 | 1475 | E500 |  |
x | x | x | x | x | ABS: Absolute value of the given term. The brackets are only necessary when a whole term is used. i.e.: ABS 12 – ABS (23*2-78) + ABS X * ABS (Y-X) | BCRP
x | x | x | x | x | ACS: Arcuscosinus, else like ABS | BCRP
 |  | x | x | x | AHC: Reciproc hyperbolic cosinus, else like ABS | BCRP
 |  | x | x | x | AHS: Reciproc hyperbolic sinus, else like ABS | BCRP
 |  | x | x | x | AHT: Reciproc hyperbolic tangens, else like ABS | BCRP
x | x | x | x | x | AREAD var$: Reads the last result on the screen and stores it in the given variable, i.e.: 10: "S": AREAD I$: PRINT I$ | BP
 | x |  | x | x | ARUN line: At the very beginning of the BASIC programs in the first line it will execute a RUN. You can use a label like "A" or "MYPROG", too. | BP
x | x | x | x | x | ASC " ": Returns the ASCII code of the first given character or variable content. | BCRP
x | x | x | x | x | ASN: Arcussinus, like ABS | BCRP
x | x | x | x | x | ATN: Arcustangens, like ABS | BCRP
 |  |  | x | x | AUTO [start line number],[step]: Makes comfortable programming possible: You press [ENTER] and you have a new line. | CP
 | x |  | x | x | AUTOGOTO line: Like ARUN, but it doesn't delete variables. | BP
 | x |  | x | x | BASIC: Uses BASIC mode (for programming). | CP
x |  | x |  |  | BEEP count: Makes a short high beep | BCRP
 | x |  | x | x | BEEP count 0..65535 (, frequency 0..255, length 0..65535): Makes sounds: Height of sound n in 0..255, length in 0..65535, this formula gives the frequency of the tone [image] , you can use my BASIC program "Notedit" which is a small music editor. Without the terms in brackets the command only beeps high. | BCRP
x | x | x | x | x | CALL address: Executes machine programs at given address between 0..65535. | BCRP
x | x | x | x | x | CHAIN ["file.ext",]["password"]: A program can load another program from cassette and execute it. | BP
x | x | x | x | x | CHR$: Returns the character of the given ASCII code 0..255. | BCRP
 | x |  | x | x | CIRCLE: Only for plotter and ink printer: Draws circles, ovals and sectors. | BCRP
x | x | x | x | x | CLEAR: Deletes all variables and arrays. | BCRP
x | x | x | x | x | CLOAD ["file.ext",]["password"]: Loads a program from tape, you can use file names. | CRP
x | x | x | x | x | CLOAD? ["file.ext",]["password"]: Compares a program with tape (you can use a filename). | CRP
x | x | x | x | x | CLOAD M ["file.ext",] address: Loads a machine program from tape to the given address.: CLOAD M ["file name"] 34768 | CRP
x | x |  | x | x | CLOSE [list of file numbers]: Closes the serial interface or files. | BCRP
 | x |  | x | x | CLOSE #1: Closes serial interface. | BCRP
x | x |  | x | x | CLS: Clears the screen. | BP
 | x |  | x | x | COLOR 0..6[,7]: Changes the ink colour. [,7] makes white. | BCRP
x | x |  | x | x | CONSOLE columns: Sets the line break column for the serial printer. | BCRP
x | x | x | x | x | CONT: Continues a with break interrupted program. | CR
 |  |  | x |  | CONVERT 1..3: Converts RAM cards for 1=PC-1460/1425, 2=PC-1360, 3=PC-1450. | CRP
 | x | x | x | x | COPY "[d:]file.ext" TO "[d:]file2.ext": Copies the file. It will report an error when the destination file already exists! You can use wildcards * and ?. | BCRP
x | x | x | x | x | COS: Cosinus, like ABS. | BCRP
 | x |  | x | x | CROTATE 0..3: Text direction on printer. 0=normal, 1= down, 2=upside down, 3=up | BCRP
x | x | x | x | x | CSAVE ["d:file.ext"],["Password"]: Saves the programs in RAM to tape. You can use a filename and a password. | CRP
 | x |  | x | x | CSAVE@ ["d:file.ext"],["Password"]: Saves the program on tape compatible to older computers from SHARP. | CRP
x | x | x | x | x | CSAVE M ["d:file.ext",] start address, end address: Saves a machine program on tape. | CRP
 | x |  | x | x | CSIZE 1..63: Letter size on the printer. | BCRP
 |  | x | x | x | CUB: Kubikzahl (x³), ansonsten wie ABS | BCRP
 |  | x | x | x | CUR: Kubikwurzel, ansonsten wie ABS | BCRP
x | x |  | x | x | CURSOR position 0..95 or 0..23,0..3: Sets the screen cursor for PRINT, INPUT, i.e.: CURSOR 1,1 or CURSOR 90. PC-E500 uses LOCATE instead of CURSOR! | BP
x | x | x | x | x | DATA data list: Makes a list which can be read with READ, i.e.: DATA "Hallo, ich bin", "Simon", "wie geht's?", 125, 1 | BP
 |  | x | x | x | DECI: Conversion hexadecimal -> decimal, else like ABS. | BCRP
 |  |  | x | x | DEFDBL: Switches to double precision mode (20 digits + 2). | BCRP
 |  |  | x | x | DEFSNG: Switches back to single precision mode (10 digits + 2). | BCRP
x | x | x | x | x | DEG dd.mmssrr: Converts angles from degree, minutes, seconds to decimal numbers. | BCRP
x | x | x | x | x | DEGREE: Switches to normal degree mode. | BCRP
x | x | x | x | x | DELETE line or line, or ,line or line,line: Deletes given line, from start to including line, including line to end or area. | CP
x | x | x | x | x | DIM: Creates new arrays, you can list array names with , Usage: DIM name(number of arrays, two dimensions are possible)*length 1..80 (length only by strings) i.e. DIM I$(2,2)*80 or DIM N(18), L$(5)*12 | BCRP
x | x | x | x | x | DMS: Converts decimal numbers to degrees. | BCRP
 | x | x | x | x | DSKF (1..3): Returns the free diskspace. 1=X, 2=Y, (3=F: only when RAM card is present) | BCRP
x | x | x | x | x | END: Ends a BASIC program | BP
 | x | x | x | x | EOF (file number): Returns 1 when the end of a file is reached, otherwise 0. | BCRP
x | x |  | x | x | ERASE variable list: Deletes arrays. | BCRP
 |  |  | x | x | ERL: The line number where an error occurred. | BCRP
 |  |  | x | x | ERN: The error number of an occurred error. | BCRP
x | x | x | x | x | EXP: Calculates ex, else like ABS. | BCRP
 |  | x | x | x | FACT: Faculty n!, else like ABS | BCRP
 | x | x | x | x | FILES ["d:"] or "[d:]file.ext": Shows a list of available files. You can use wildcards * and ? to search for files. | BCRP
x | x | x | x | x | FOR..TO..[STEP..] .. NEXT..: Starts a loop, i.e.: FOR X=0 TO 10 STEP 2: .. : NEXT X | BP
x | x |  |  | x | GCURSOR (X,Y): Sets the pixel cursor. | BP
 | x |  | x | x | GLCURSOR (X,Y): Moves pen of plotter. | BP
x | x | x | x | x | GOSUB line: Starts a sub routine, you can use labels and variables with labels or numbers as content, too. | BP
x | x | x | x | x | GOTO line: Jumps to a line, else like GOSUB. | BP
x | x | x | x | x | GOTO line: Starts a program without clearing all variables and deleting all arrays what RUN does. | CR
x | x |  |  | x | GPRINT data: Draws 8 pixel big patterns following the bits of hex data like „FF0013" at the GCURSOR position. Two hex letters make 8 pixel, the first is the lower 4 bits. You can use decimal numbers, too: GPRINT 120,11,0,255 | BCRP
x | x | x | x | x | GRAD: Switches to new grad system. | BCRP
 | x |  | x | x | GRAPH: Switches the printer to graphics mode. | BCRP
 |  | x | x | x | HCS: Hyperbolic cosinus, else like ABS | BCRP
 |  | x | x | x | HEX: Conversion of decimal numbers -> hexadecimal, else like ABS | BCRP
 |  | x | x | x | HEX$: Conversion of decimal numbers -> hexadecimal string | BCRP
 |  | x | x | x | HSN: Hyperbolic sinus, else like ABS | BCRP
 |  | x | x | x | HTN: Hyperbolic tangens, else like ABS | BCRP
x | x | x | x | x | IF condition [THEN]/LET commands/variable=value: If the condition is true or greater than 0 the following commands are executed until the end of the line. You don't need to write THEN | BP
 | x | x | x | x | INIT "d:": Formats a drive. | BCRP
x | x | x | x | x | INKEY$ var$: Saves a pressed key in the string var. This var is empty when no key was pressed. | BCRP
x | x | x | x | x | INPUT ["Text";] variable list: Prints the text and queries input after the text with a cursor. You can use a list of vars, too: INPUT var,var,var | BP
x | x |  | x | x | INPUT # variable list: Loads values from tape, you can use a filename, too: INPUT # "name",var. For arrays use syntax like I$(*) | BCRP
 | x |  | x | x | INPUT #1 variable list: Loads from SIO, else like INPUT #. | BCRP
 | x |  | x | x | INPUT #2-7,20-25 variable list: Reads from a file. | BCRP
x | x | x | x | x | INT: Cuts everything after a dot and makes whole numbers. | BCRP
 | x | x | x | x | KILL "[d:]file": Deletes a file. | BCRP
x | x | x | x | x | LEFT$ (string, length): Returns the left part with the given length. | BCRP
x | x | x | x | x | LEN string: Returns the length of a string. | BCRP
x | x | x | x | x | LET: You must use it after a THEN or the condition when you want to operate on a variable as the first command i.e.: IF X>=10 LET X=9 | BP
 | x |  | x | x | LF: Paper feed for printer. You can use a number for more than one line. | BCRP
 | x | x | x | x | LFILES: Like FILES, but it prints the result. | BCRP
x | x |  |  | x | LINE (X1,Y1)-(X2,Y2),attributes: Draws lines from point to point; attributes are: S/R/X,pattern,B/BF. The pattern is a number 0..65535 which draws the bits as pixels. S = sets pixels, R = deletes pixels, X = inverts pixels; B = draws a rectangle, BF = filled rectangle. | BCRP
x | x | x | x | x | LIST line: In program mode: Shows the given line or label. | CP
 | x |  | x | x | LLINE: Draws lines like LINE on the printer. | BCRP
x | x | x | x | x | LLIST: like DELETE, prints the lines on a printer. | CP
x | x | x | x | x | LN: Calculates the LN. | BCRP
x | x |  | x | x | LOAD: Loads a program from SIO. (after OPEN) | CRP
 | x | x | x |  | LOAD "[d:]file.ext": Loads a program from a file | CRP
 |  |  |  | x | LOAD "[d:]file.ext" [,R]: Loads a program from a file, with ",R" it will be run automatically. | CRP
 | x | x | x | x | LOAD? [like LOAD]: Compares a program with a file. When it is the same nothing happens. If an error occurs the computer shows ERROR 8. The is not loaded in any case! | CRP
 | x | x | x | x | LOAD M [like LOAD],address: Loads a machine program from a file to the given address. | CRP
 | x | x | x | x | LOC file number: Returns the position of the file pointer: LOC (2) | BCRP
 | x | x | x | x | LOF file number: Returns the size of the file: LOF (2) | BCRP
x | x | x | x | x | LOG: Calculates LOG. | BCRP
x | x | x | x | x | LPRINT data: Prints data over the SIO when it's open. | BCRP
 | x |  | x | x | LTEXT: Switches the printer to text mode. | BCRP
x | x | x | x | x | MDF: Uses USING to round numbers up. | BCRP
x | x | x | x | x | MEM: Free memory. | BCRP
 | x |  | x | x | MEM$: Returns memory configuration. | BCRP
x | x | x | x | x | MERGE ["[d:]file.ext"],["Password"]: Loads another program from tape to the existing. | CRP
x | x | x | x | x | MID$ (string,startpos,length): Extracts a string. | BCRP
 | x | x | x | x | NAME "[d:]oldname" AS "[d:]newname": Changes the name of a file. | BCRP
 |  | x | x | x | NCR(n,r): Kombinatorik, rechnet nCr=n!/(r!(n-r)!) aus. | BERP
x | x | x | x | x | NEW: Deletes all BASIC programs and RESERVE memory. | CP
x | x | x | x | x | NEXT variable: The end of a FOR loop. | BP
x | x | x | x | x | NOT: Logical NOT: Inverts all bits. | BCRP
 |  | x | x | x | NPR(n,r): Kombinatorik, rechnet nPr=n!/(n-r)! aus. | BERP
x | x | x | x | x | ON var GOSUB sub list: var <1 nothing happens, var = 1 first sub in list is executed, 2 = second, ... | BP
x | x | x | x | x | ON..GOTO: like ON..GOSUB | BP
x | x |  | x | x | OPEN: Opens the serial interface SIO (open until switched off), takes parameters like: "1200,N,8,1,A,C,&1A" 1200 = baud rate 300, 600 or 1200 N = parity N (none), E (even), O (odd) 8 = data bits 7 or 8 1 = stop bits 1 or 2 A = for ASCII mode C = return mode: C (CHR 13: CR), F (CHR 10: LF), or L (CR+LF) &1A = end code for program transmissions. | BCRP
 | x | x | x | x | OPEN "[d:]name.ext" FOR INPUT/OUTPUT/APPEND AS #2 to #7 or #20 to #25: Opens files for reading (INPUT) or writing (OUTPUT) or appending (APPEND). d is the device: X,Y=disk [PC-E500: E,F=RAM, COM=serial, CAS=Cassette]. The file can be used with INPUT #number and PRINT #number. CLOSE #number closes it. #2-#7: Files on disks #20-#25: Files on RAM disk | BCRP
x | x |  | x | x | OPEN$: Returns the parameters. | BCRP
 | x |  | x | x | PAINT value: Fills graphics on printer with patterns. | BCRP
x | x | x | x | x | PASS "Password": Protects the program with a password or removes it. | CP
x | x | x | x | x | PAUSE data: Like PRINT, but the PC waits 0.85 sec. | BP
x | x | x | x | x | PEEK address: Returns the byte at the given address. | BCRP
x | x | x | x | x | PI: Like [image] , returns the number. | BCRP
x | x |  |  | x | POINT (X,Y): Returns the state of the pixel at X,Y with 0 or 1. | BCRP
x | x | x | x | x | POKE address, data: Writes data into RAM: POKE 64089,48,2,32,160,8,10,162 | BCRP
 |  | x | x | x | POL(X,Y): Rectangle coordinate to polar coordinate. | BCRP
x | x |  |  | x | PRESET (X,Y): Deletes the pixel at X,Y so it is blank. | BCRP
x | x | x | x | x | PRINT: Prints to screen: PRINT "Text" writes the text at cursor position PRINT variable writes the content PRINT data, data, data... writes data in two columns PRINT ;data writes after the last printed character. PRINT data; data; data... ongoing writing PRINT number: numbers are right bound, text left and every PRINT starts a new line except ; is used. | BP
x | x | x | x | x | PRINT #["[d:]file.ext"],variable list: Writes to tape, useable with file name. | BCRP
x | x |  | x | x | PRINT #1,variable list: Writes variables to serial interface. | BCRP
 | x |  | x | x | PRINT #2 to #7 and #20 to #25,variable list: Sends data to a file | BCRP
x | x |  |  | x | PSET (X,Y): Sets pixel, usable with S,R or X like LINE. | BCRP
x | x | x | x | x | RADIAN: Another degree mode. | BCRP
x | x | x | x | x | RANDOM: Initialises random number generator. | BCRP
 |  | x | x | x | RCP: Reciproc 1/X | BCRP
x | x | x | x | x | READ variable list: Reads from DATA list in sequence. | BP
 |  | x | x | x | REC(r,O): Conversion polar to rectangle coordinates. | BCRP
x | x | x | x | x | REM text: Adds comments. | BP
x | x | x | x | x | RENUM new line[,start line][,increment]: Sorts the lines: RENUM 10 (new line), 271 (old line),100 (step) | CP
x | x | x | x | x | RESTORE [line]: Sets DATA pointer back to the beginning or a given position. | BP
x | x | x | x | x | RETURN: Returns from a sub program. | BP
x | x | x | x | x | RIGHT$ (string,length): Like LEFT$, only extracting right part. | BCRP
 | x |  | x | x | RLINE: like LINE, only for printer with relative coordinates. | BCRP
x | x | x | x | x | RND number: Makes a random number 1 to number (if number >1), else fractioned number between 0 and 1. | BCRP
 |  | x | x | x | Y ROT X: x [image] y | BCRP
x | x | x | x | x | RUN line: Look at GOTO | CR
 | x | x | x | x | SAVE: Sends all programs to SIO. (after OPEN was used) | BCRP
 | x | x | x | x | SAVE [like LOAD] [,A]: Sends all programs to a file. ",A" writes ASCII code, otherwise it will be binary (smaller). | ERP
 | x | x | x | x | SAVE M [like SAVE,] start address,end address: Sends the given memory area in a file | BCRP
 | x | x | x | x | SET "[d:]file.ext","P" or " ": Switches write protection on ("P") or off (" ") | BCRP
 | x |  | x | x | SET MEM: For two RAM cards: SET MEM "B" = programs only in card 1 and variables in 2 SET MEM "D" = all 2 cards share the data SET MEM "C" = only the card 1 is used. For PC-1475 and PC-E500: SET MEM "1" = only card 1 is used SET MEM "2" = only card 2 is used | BCRP
x | x | x | x | x | SGN: Returns the sign +, 0 or - (1, 0 or -1). | BCRP
x | x | x | x | x | SIN: Sinus. | BCRP
 | x |  | x | x | SORGN: For plotter: Position of pen is new 0,0 coordinate. | BCRP
x | x | x | x | x | SQR: Square root, like [image] . | BCRP
 |  | x | x | x | SQU: Square x² | BCRP
x | x | x | x | x | STOP: Makes a break like the BRK key. | BP
x | x | x | x | x | STR$: Converts a number to a string. | BCRP
x | x | x | x | x | TAN: Tangens of the number. | BCRP
 |  | x | x | x | TEN: Anti logarithm 10x | BCRP
 | x |  | x | x | TEXT: Switches to text mode so that every character is ASCII. In normal mode the commands are 2 byte blocks in RAM, in text mode they are ASCII strings. | CP
x | x | x | x | x | TROFF: Trace mode off. | CRP
x | x | x | x | x | TRON: Trace mode on: Every line is run step by step. | CRP
x | x | x | x | x | USING "format": Defines a format for printing data: # = number, . = dot, ^ = exponent, & = any character. USING "###.##^## &&&&" | BCRP
x | x | x | x | x | VAL string: String to number. | BCRP
x | x | x | x | x | WAIT: Waits for a given time 59 = ca. 1 second. Without parameter it waits for enter. | BCRP
 |  | x | x | x | no.1 XOR no.2: Logical XOR: Sets the bits only when one of the two numbers have this bits. | BCRP


Machine Language

  • Mnemonic List
  • Register List
  • Test Command
  • Specialities of PC-1360
    • Ports
      • A Port
      • B Port
      • C Port
      • F Port
      • RAM Ports
        • Address &3E00
        • Address &3800
        • Address &3400
    • Keyboard Connection
  • Specialities of PC-1350
    • Ports
      • B Port
      • F Port
    • Keyboard connection
  • Specialities of PC-140x
    • Ports
      • B Port
      • F Port
    • Keyboard connection
  • Specialities of PC-1421
    • Ports
      • B Port
      • F Port
    • Keyboard connection
  • Specialities of PC-1260
    • Ports
      • B Port
      • F Port
    • Keyboard connection

Mnemonics

Mnemonic | Code | Description | Flags | # | Cycles | Comments
 |  |  | C Z
ADB | 20 | (P)+A->(P) | * * | 1 | 5 | P+1->P
 |  | (P+1)+B+C->(P+1)
ADCM | 196 | (P)+A+C->(P) | * * | 1 | 3
ADIA n | 116,n | A+n->A | * * | 2 | 4
ADIM n | 112,n | (P)+n->(P) | * * | 2 | 4
ADM | 68 | (P)+A->(P) | * * | 1 | 3
ADN | 12 | (P)+A->(P)... | * * | 1 | 7+3*I | P-I-1->P
 |  | (P-I)+C->(P-I) |  |  |  | BCD
ADW | 14 | (P)+(Q)->(P)... | * * | 1 | 7+3*I | P-I-1->P
 |  | (P-I)+(Q-I)+C-> |  |  |  | Q-I-2->Q
 |  | (P-I) |  |  |  | BCD
ANIA n | 100,n | A AND n->A | - * | 2 | 4
ANID n | 212,n | (DP) AND n>(DP) | - * | 2 | 6
ANIM n | 96,n | (P) AND n->(P) | - * | 2 | 4
ANMA | 70 | (P) AND A->(P) | - * | 1 | 3
CAL nm | 224,n,m | PC+2>(R-1,R-2) | - - | 2 | 7 | 0<=n<=31
 |  | R-2->R, nm->PC
CALL nm | 120,n,m | PC+3->(R-1,R-2), | - - | 3 | 8
 |  | R-2->R, nm->PC
CPIA n | 103,n | A-n | * * | 2 | 4
CPIM n | 99,n | (P)-n | * * | 2 | 4
CPMA | 199 | (P)-A | * * | 1 | 3
DATA | 53 | (BA)...(BA+1)-> | - - | 1 | 11+4*I | auch für
 |  | (P)...(P+1) |  |  |  | int. ROM
DECA | 67 | A-1->A | * * | 1 | 4 | 2->Q
DECB | 195 | B-1->B | * * | 1 | 4 | 3->Q
DECI | 65 | I-1->I | * * | 1 | 4 | 0->Q
DECJ | 193 | J-1->J | * * | 1 | 4 | 1->Q
DECK | 73 | K-1->K | * * | 1 | 4 | 8->Q
DECL | 201 | L-1->L | * * | 1 | 4 | 9->Q
DECP | 81 | P-1->P | - - | 1 | 2
DECV | 75 | V-1->V | * * | 1 | 4 | 10->Q
DECW | 203 | W-1->W | * * | 1 | 4 | 11->Q
DX | 5 | X-1->X, X->DP | - - | 1 | 6 | 5->Q
DXL | 37 | X-1->X, X->DP, | - - | 1 | 7 | 5->Q
 |  | (DP)->A
DY | 7 | Y-1->Y, Y->DP |  | 1 | 6 | 7->Q
DYS | 39 | Y-1->Y, Y->DP, | - - | 1 | 7 | 7->Q
 |  | A->(DP)
ETC | 105 | FOR i=1 TO H | - * | ) | 1)
n,m | n,nm | IF A=n nm->PC
... |  | NEXT i
nm
EXAB | 218 | A<->B | - - | 1 | 3
EXAM | 219 | A<->(P) | - - | 1 | 3
EXB | 11 | (P)...(P+J)<-> | - - | 1 | 6+3*J | P+J+1->P
 |  | (Q)...(Q+J) |  |  |  | Q+J+1->Q
EXBD | 27 | (P)...(P+J)<-> | - - | 1 | 7+6*J | P+J+1->p
 |  | (DP)...(DP+J) |  |  |  | DP+J->DP
EXW | 9 | (P)...(P+I)<-> | - - | 1 | 6+3*I | P+I+1->P
 |  | (Q)...(Q+I) |  |  |  | Q+I+1->Q
EXWD | 25 | (P)...(P+I)<-> | - - | 1 | 7+6*I | P+I+1->P
 |  | (DP)...(DP+I) |  |  |  | DP+I->DP
FILD | 31 | A->(DP)...(DP+I) | - - | 1 | 4+3*1 | DP+I->DP
FILM | 30 | A->(P)...(P+I) | - - | 1 | 5+I | P+I+1->P
INA | 76 | IA-Port->A | - * | 1 | 2
IMB | 204 | IB-Port->A | - * | 1 | 2
INCA | 66 | A+1->A | * * | 1 | 4 | 2->Q
INCB | 194 | B+1->B | * * | 1 | 4 | 3->Q
INCI | 64 | I+1->I | * * | 1 | 4
IMCJ | 192 | J+1->J | * * | 1 | 4 | 1->Q
INCK | 72 | K+1->K | * * | 1 | 4 | 8->Q
JNCL | 200 | L+1->L | * * | 1 | 4 | 9->Q
INCP | 80 | P+1->P | - - | 1 | 2
INCV | 74 | V+1->V | * * | 1 | 4 | 10->Q
INCW | 202 | W+1->W | * * | 1 | 4
IX | 4 | X+1->X, X->DP | - - | 1 | 6 | 5->Q
IXL | 36 | X+1->X, X->DP, | - - | 1 | 7 | 5->Q
 |  | (DP)->A
IY | 6 | Y+1->Y, Y->DP | - - | 1 | 6 | 7->Q
IYS | 38 | Y+1->Y, Y->DP, | - - | 1 | 7 | 7->Q
 |  | A->(DP)
JP nm | 121,n,m | nm->PC | - - | 3 | 6
JPC nm | 127,n,m | IF C=1 nm->PC | - - | 3 | 6
JPNC nm | 125,n,m | IF C=0 nm->PC | - - | 3 | 6
JPNZ nm | 124,n,m | IF Z=0 nm->PC | - - | 3 | 6
JPZ nm | 126,n,m | IF Z=1 nm->PC | - - | 3 | 6
JPZM n | 57,n | IF Z=1 | - - | 2 | 7/4
 |  | PC+1-n->PC
JRCN n | 59,n | IF C=1 | - - | 2 | 7/4
 |  | PC+1-n->PC
JRCP n | 58,n | IF C=1 | - - | 2 | 7/4
 |  | PC+1+n->PC
JRM n | 45,n | PC-1-n->PC | - - | 2 | 7
JRNCM n | 43,n | IF C=0 |  | 2 | 7/4
 |  | PC+1-n->PC
JRNCP n | 42,n | IF C=0 | - - | 2 | 7/4
 |  | PC+1+n->PC
JRNZM n | 41,n | IF Z=0 | - - | 2 | 7/4
 |  | PC+1-n->PC
JRNZP n | 40,n | IF Z=0 | - - | 2 | 7/4
 |  | PC+1+n->PC
JRP n | 44,n | PC+1+n->PC | - - | 2 | 7
JRZN n | 57,n | IF Z=1 | - - | 2 | 7/4
 |  | PC+1-n->PC
JRZP n | 56,n | IF Z=1 | - - | 2 | 7/4
 |  | PC+1+n->PC
LDD | 87 | (DP)->A | - - | 1 | 3
LDM | 89 | (P)->A | - - | 1 | 2
LDP | 32 | P->A | - - | 1 | 2
LDQ | 33 | Q->A | - - | 1 | 2
LDR | 34 | R->A | - - | 1 | 2
LIA n | 2,n | n->A | - - | 2 | 4
LIB n | 3,n | n->B | - - | 2 | 4
LIDL m | 17,m | m->DPL | - - | 2 | 5
LIDP nm | 16,n,m | nm->DP | - - | 3 | 8
LII n | 0,n | n->I | - - | 2 | 4
LIJ n | 1,n | n->J | - - | 2 | 4
LIP n | 18,n | n->P | - - | 2 | 4
LIQ n | 19,n | n->Q | - - | 2 | 4
LOOP n | 47,n | (R)-1->(R), IF | * * | 2 | 10/7
 |  | C=0 DP+1-n->DP
LP n | 128+n | n->P | - - | 1 | 2 | 0<=n<63
MVB | 10 | (Q)...(Q+J)-> | - - | 1 | 5+2*J | P+J+1->P
 |  | (P)...(P+J) |  |  |  | Q+J+1->Q
MVBD | 26 | (DP)...(DP+J)-> | - - | 1 | 5+4*J | P+J+1->P
 |  | (P)...(P+J) |  |  |  | DP+J->DP
MVDM | 83 | (P)->(DP) | - - | 1 | 3
MVMD | 85 | (DP)->(P) | - - | 1 | 3
MVW | 8 | (Q)...(Q+I)-> | - - | 1 | 5+2*I | P+I+1->P
 |  | (P)...(P+I) |  |  |  | Q+I+1->Q
MVWD | 24 | (DP)...(DP+I)-> | - - | 1 | 5+4*I | P+I+1->P
 |  | (P)...(P+I) |  |  |  | DP+I->DP
NOPT | 206 | No Operation | - - | 1 | 3
NOPW | 77 | No Operation | - - | 1 | 2
ORIA n | 101,n | A OR n->A | - * | 2 | 4
ORID n | 213,n | (DP) OR n->(DP) | - * | 2 | 6
ORIM n | 97,n | (P) OR n->(P) | - * | 2 | 4
ORMA n | 71,n | (DP) OR n->(DP) | - * | 1 | 3
OUTA | 93 | (92)->IA-Port | - - | 1 | 3 | 92->Q
OUTB | 221 | (93)->IB-Port | - - | 1 | 2 | 93->Q
OUTC | 223 | (95)->C-PORT | - - | 1 | 2
OUTF | 95 | (94)->F0-Port | - - | 1 | 3 | 94->Q
POP | 91 | (R)->A, R+1->R | - - | 1 | 2
PTC | 122 | n->H,nm->(R-1, | - * | 4 | 9
 |  | R-2), R-2->R
PUSH | 52 | (R)->A, R-1->R | - - | 1 | 3
RC | 209 | 0->C, 1->Z | * * | 1 | 2
RTN | 55 | (R-1,R-2)->PC | - - | 1 | 4
 |  | R+2->R
SBB | 21 | (P)-1->(P) | * * | 1 | 5 | P+1->P
 |  | (P+1)-B-C->(P+1)
SBCM | 197 | (P)-A-C->(P) | * * | 1 | 3
SBIA n | 117,n | A-n->A | * * | 2 | 4
SBIM n | 113,n | (P)-n->(P) | * * | 2 | 4
SBM | 69 | (P)-A->(P) | * * | 1 | 3
SBN | 13 | (P)-A->(P) | * * | 1 | 7+3*I | P-I-1->P
 |  | (P-I)-C->(P-I) |  |  |  | BCD
SBW | 15 | (P)-(Q)->(P) | * * | 1 | 7+3*I | P-I-1->P
 |  | (P-I)-(Q-I)-C-> |  |  |  | Q-I-2->Q
 |  | (P-I) |  |  |  | BCD
SC | 208 | 1->C, 1->Z | * * | 1 | 2
SL | 90 | C->A7...A0->C | - - | 1 | 2
SLW | 29 | (P-1)...(P) | - - | 1 | 5+I | P-I-1->P
 |  | 4 Bit SL
SR | 210 | C->A0...A7->C | * - | 1 | 2
SRW | 28 | (P)...(P+I) | - - | 1 | 5+I | P+I+1->P
 |  | 4 Bit SR
STD | 82 | A->(DP) | - - | 1 | 2
STP | 48 | A->P | - - | 1 | 2
STQ | 49 | A->Q | - - | 1 | 2
STR | 50 | A->R | - - | 1 | 2
SWP | 88 | A0...A3<-> | - - | 1 | 2
 |  | A4...A7
TEST n | 107,n | TEST-Byte AND n | - * | 2 | 4
TSIA n | 102,n | A AND n | - * | 2 | 4
TSID n | 214,n | (DP) AND n | - * | 2 | 6
TSIM n | 98,n | (P) AND n | - * | 2 | 4
WAIT n | 78,n | No Operation | - - | 2 | 6+n

Registers

Register | Address | Description
P |  | 7 bit internal RAM pointer
Q |  | 7 bit internal RAM pointer
R |  | 7 bit internal RAM stack pointer
PC |  | 16 bit program counter
DP |  | 16 bit data pointer
Z |  | Zero Flag
C |  | Carry Flag
D |  | Internal index (not accessible for users)
I | &00 | Index
J | &01 | Index
A | &02 | Main Accumulator
B | &03 | Secondary Accumulator
XL | &04 | X = XL + 256 x XH
XH | &05
YL | &06 | Y = YL + 256 x YH
YH | &07
K | &08 | Common use
L | &09 | Common use
M | &0A | Common use
N | &0B | Common use
 | &0C - &5B | System stack (starts at &5B and descends)
IA | &5C | I/O Port A
IB | &5D | I/O Port B
FO | &5E | I/O Port F
OUTC | &5F | Control Port
OR X | &10 - &17 | Operation register
OR Y | &18 - &1F | Operation register
OR Z | &20 - &27 | Operation register
OR W | &28 - &2F | Operation register
ERL | &34 | Error number when error occurs
LB,HB | &3E, &3F | Actual line number
LB,HB | &38, &39 | Beginning of BASIC block, where the running program is
LB,HB | &3A, &3B | Address of a found line
LB,HB | &3C, &3D | The line number of the found line

Test command

Bit | Description
0 | System clock 512 ms
1 | System clock 2 ms
2 | -
3 | BRK/ON key
4 | -
5 | -
6 | RESET key
7 | Cassette input - Pin 6 printer, I

Specialities of PC-1360

Ports

A port

Bit | Description
0-7 | Keyboard column

B port

Bit | Description
0 | -
1 | -
2 | -
3 | Pin 8 printer, I
4 | Pin 9 printer, IO
5 | Pin 3 serial, IO
6 | Pin 5 serial, IO
7 | Pin 8 serial, IO

C port

Bit | Description
0 | Display 1=on/0=off
1 | Counter reset
2 | CPU halt
3 | Computer 0=on/1=off
4 | Beeper frequency 0=2kHz/1=4kHz
5 | Beeper 1=on/0=off (off: Bit 4: Beeper 1=on/0=off)
6 | -
7 | -

F port

Bit | Description
0 | -
1 | Pin 2 serial, O
2 | Switch RAM bank, 0=bank 0, 1=bank 1
3 | -
4 | -
5 | -
6 | -
7 | -

RAM ports

Addresses &3E00-&3EFF

Value | Description
0-7 | Keyboard row

Addresses &3800-&38FF

Bit | Description
0 | Pin 4 serial and 11 printer, O
1 | Pin 14 serial, O
2 | Pin 11 serial, O
3 | -
4 | -
5 | -
6 | -
7 | -

Addresses &3400-&34FF - ROM bank switch

Value | Description
0 | Bank 0
1 | Bank 1
2 | Bank 2
3 | Bank 3
4 | Bank 4
5 | Bank 5
6 | Bank 6
7 | Bank 7

Keymap PC-1360

Specialities of PC-1350

Port B (&5D = 93 int. RAM)

Bit | Pin | D=11-Pin-Interface | I=In-,O=Output
4 | 11 | D | IO
5 | 10 | D | IO
6 | 9 | D | IO
7 | 8 | D | IO

Port F (only output, &5E = 94 int. RAM)

Bit | Pin Printer
1 | 5
2 | 4

Keyboard PC-1350

Specialities of PC-140x

Port B (&5D = 93 int. RAM)

Bit | Pin | D=11-Pin-Interface | I=In-,O=Output
6 | 9 | D | IO
7 | 8 | D | IO

Port F (only output, &5E = 94 int. RAM)

Bit | Pin Printer
0 | 4
1 | 5

Keyboard PC-140x

Specialities of PC-1421

Port B (&5D = 93 int. RAM)

Bit | Pin | D=11-Pin-Interface | I=In-,O=Output
6 | 9 | D | IO
7 | 8 | D | IO

Port F (only output, &5E = 94 int. RAM)

Bit | Pin Printer
0 | 4
1 | 5

Keyboard PC-1421

Specialities of PC-1260

Port B (&5D = 93 int. RAM)

Bit | Pin | D=11-Pin-Interface | I=In-,O=Output
6 | 9 | D | IO
7 | 8 | D | IO

Port F (only output, &5E = 94 int. RAM)

Bit | Pin Printer
0 | 4
1 | 5

Keyboard PC-126x

Top


Glossary

Address

An address specifies a certain Position in memory which contains a single [image] byte.

Accu

Accu = Accumulator. A battery which can be recharged.

Array

An array consists of several [image] variables which are indexed by a number beginning with 0. The variables in the array have the same name. Example: DIM A(4) consists of 5 variables A, A(0) to A(5). There are more dimensional arrays, too, which have more indexes: DIM A(2,3). Now you have A(0,0) A(0,1)... A(2,0)... A(2,3)

ASCII

The ASCII code assigns a character to each [image] byte. With this it was possible to print readable characters on the screen! Example: The code of A is 65.

Assembler

An assembler is a [image] program, which allows the easy editing of [image] machine language.

BASIC

BASIC is a simple programming language which is often used by [image] interpreters. The commands of this language are easy to understand.
Here you can get the BASIC commands for PC-1360

Baud Rate

Baud means switchings/second. When you have extra start and stop bits (i.e. serial transmission), the baud rate is higher than the real data rate.

BCD format

The BCD format makes it possible to store real numbers in [image] bytes. Each byte is parted in two "nibbles" consisting of 4 [image] bits.

Bit

A bit is the smallest unit a computer can use. It can only have the value 0 or 1.

Byte

A byte consists of 8 [image] bits and can get 2^8 = 256 different values. The first bit is bit 0 and has the value 2^0 = 1. The second is bit 1 with 2^1 = 2. Then up to bit 7 with a value of 2^7 = 128. When you set the bits 3 and 7 you get the value 2^3+2^7 = 8+128 = 136.

CMOS

A chip technology which has a low power consumption.

Compiler

A compiler translates a [image] program before running it to [image] machine language. So the program gets much faster than with an [image] interpreter. But you can find errors only in the compiler and this is not that easy.

CPU

Central Processing Unit. This complex chip does the work in a computer. It executes the commands in its memory and can communicate with other devices through its [image] ports.

DEF

The DEF key is used to start [image] programs. If you write a line like 10 "A" Program... you can start it with DEF + A, too!

Emulator

An emulator can make your computer "playing" another device.

EOT code

The pocket computer sends a certain [image] byte after a program transmission. After a reset this is &1A.

Function

A command which can return a value.

HB

HB = high byte. It is the upper part of a [image] word.

Header

A header contains necessary information. For example, the RAM cards get a header when initializing. This header contains information about size, [image] BASIC, [image] reserve mode, etc. Each with DIM initialized [image] variable gets a header, too, which stores size, length, name and type (number or [image] string).

Hexadecimal

The hexadecimal system uses 16 values for each digit instead of 10 like the decimal system. The digits 10-15 are replaced by A-F. To mark these type of number, a small h or & symbol are used.

Interface

An interface connects a computer to other devices.

Interpreter

An interpreter executes a [image] program step by step. So you can find errors very fast but the program gets quite slow.

LB

LB = low byte. It is the lower part of a [image] word.

Line Ending Code

This code is sent at the end of each line during a [image] serial transmission. CR means Chr(13) and LF = Chr(10), CR+LF is both.

Mapping

When you access data in memory (i.e. display) there is an area where the same data is stored. When you change data, the data in the second area is changed, too. So this area is mapped.

Machine Language

Machine language consists of numbers which make the [image] CPU do certain things. To write machine language, an [image] Assembler is used. So you don't have to know the numbers but you have to write [image] mnemonics. Some commands need parameters which are added behind the mnemonic.

Mnemonic

A mnemonic is an easy to remember word for a [image] machine language command. You use mnemonics in an [image] assembler. Example: LIA is a mnemonic.

Operator

An operator is a symbol which means addition, subtraction, multiplication, division but also logical operators which calculate with [image] bits like AND, OR or NOT.

Parity

There is an even and an odd parity. So you can detect errors in [image] serial transmissions. A single [image] bit is added after the data bits. If the number of high data bits is even an even parity bit is set and vice versa.

Pointer

A pointer contains an [image] address. It points to a memory location. Example: The [image] BASIC pointer. It points to the beginning of the BASIC [image] program.

Port

Ports are digital input and output lines from the [image] CPU. They can be read and set with certain commands.

Program Mode

In this mode you can edit [image] BASIC [image] programs.

Program

A program is a sequence of commands which have a certain purpose. A [image] BASIC program for example consists of BASIC commands.

RAM

RAM = Random Access Memory. This is memory which can be written to.

Register

A register is a memory location inside the [image] CPU. You can read and write to registers using certain commands. Some registers are only for internal purposes and can't be read.

Reserve Mode

The reserve mode allows to edit the shortcuts you can insert by pressing SHIFT + letter.

ROM

ROM = Read Only Memory. This kind of memory is only for reading. Any write access will be ignored. In PC-1360 the ROM is divided up in banks. There are 8 banks and the internal ROM of the [image] CPU.

Run Mode

In this mode you can run [image] programs but you can't change them.

Serial Interface

The serial interface is a common [image] interface. The protocol consists of a start [image] bit, data bits, [image] parity bit and stop bits. The speed is defined with the [image] baud rate.

SIO

SIO = [image] serial interface.

Stack

An area in the memory of the [image] CPU. Here the CPU stores the return [image] addresses of the programs which call subroutines.

String

A string is a chain of characters in [image] ASCII code. Each character needs one [image] byte in memory.

Variable

Variables are areas in memory which contain data like numbers or text. They have a name which makes access possible. PC-1360 allows only up to 2 characters for a name: A, AB and B2 are valid names. Forbidden are symbols or spaces and you can't use a number for the first character or [image] BASIC commands. Assign a value to a variable with =. Example: A = 10
To store text to a variable you must add a dollar sign to the name: AB$ = "Text". The text must have "! Such a variable contains a [image] string. Variables can be [image] arrays, too.

Word

A word consists of 2 [image] bytes, a [image] LB and a [image] HB. The value of a word is HB * 256 + LB.


Weaknesses

The program has some problems which have chiefly to do with some Windows functions:

  • PocketASM is not able to open binary files correctly.
  • The program is quite large in comparison to Notepad or Visual Basic programs because it contains all executable data and no external .dll files are required.


Version History

5.x Series:
  • TransDrive save bug repaired
  • TransDrive load bug repaired
  • Whole word search and replace repaired
  • Program size calculation added
  • Line limitation available
  • Assemble to hexadecimal code repaired
  • Macrosystem now has a comfortable editor and uses only one table file
  • Parity
  • Converter can work with source code
  • Better RENUM
  • Better search
  • Really fast replace
  • Toolbar with icons
  • Menu with icons
  • Many bugs removed (Assemble to binary was to be done first and many more)
  • Automatic transdrive file converter
  • Label search
  • Different Pocket Computer models
  • Disassembler works now correctly

4.x Series:
  • Macros in a tree with edit/new/delete/move/...
  • More bugs were removed
  • New converter for ASCII
  • Memo is now RichText
  • Cursor position is updated at once while moving cursor
  • Auto completing
  • Bugs in serial transmission were removed
  • Bugs in macro manager were removed
  • Marked text is sent/received
  • Search/Replace with whole words

3.x Series:
  • Insert menu now with explanation in the status bar
  • Internal assembler from Laurent Duveau
  • Bugs in the new assembler :-)
  • Assemble to window
  • Assembler bug "Error in line" removed
  • The first two number converters
  • BASIC renum
  • Macros in the main menu, no edit/new/delete
  • More bugs found
  • New file types to open and save

2.xx Series:
  • Language files
  • Explanation of the typed mnemonics
  • Convert files
  • Data transmission over serial interface
  • I found some bugs and removed them

1.x Series:
  • Editor with external assembler
  • Memo with maximal 65535 bytes capacity
  • bugs and even more bugs :-)
  • Status bar with cursor position and modified sign
  • Warnings when overwriting, etc
  • Undo, copy, paste, cut, delete, mark all, break lines
  • Search
  • Disassemble
  • Info
  • Help
  • Print
  • Replace
  • Insert mnemonics